﻿<%@ page contentType="text/html; charset=UTF-8"%>
<% response.setHeader("Cache.Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader("Expires",0);%>

<jsp:useBean id="action" scope="request"
	class="swd.maintain.project.prg_in_sys_maintain.Action" />
<jsp:useBean id="view" scope="request"
	class="swd.maintain.project.prg_in_sys_maintain.View" />
<jsp:setProperty name="view" property="*" />
<%if (action.action(pageContext).equals("login")){return;} %>
<jsp:useBean id="DataView" scope="request"
	type="com.pub.database.DataView" />
<!-- 以下為DataView 共用設定 -->
<jsp:useBean id="DataViewForm" scope="request"
	type="com.pub.database.DataViewForm" />
<jsp:setProperty name="DataViewForm" property="submitMethod"
	value="POST" />
<jsp:setProperty name="DataViewForm" property="pageRowCount" value="0" />
<jsp:setProperty name="DataViewForm" property="nowPageNum" />
<jsp:setProperty name="DataViewForm" property="dataViewAction" />
<jsp:setProperty name="DataViewForm" property="filterCol" />
<jsp:setProperty name="DataViewForm" property="filterValue" />
<jsp:setProperty name="DataViewForm" property="dvOrderByFields" />
<jsp:setProperty name="DataViewForm" property="dvOrderBySeq" />
<!-- DataView 設定結束 -->

<html>
<head>
<title></title>
<LINK HREF="/SWD/workflow.css" REL="STYLESHEET" TYPE="TEXT/CSS">
<script type="text/javascript" language="javascript1.2"
	src="/PUBPAGE/general/commscript.js"></script>
<script type="text/javascript" language="javascript1.2"
	src="/PUBPAGE/general/commhtmlscript.js"></script>
<SCRIPT type="text/javascript" LANGUAGE="javascript1.2"
	SRC="/SWD/general/swd.js"></SCRIPT>
</head>
<script language="javascript" type="">
    function saveRowSn(rowsn){
       if(document.all.item('rowsn').value.indexOf(rowsn)>-1){
          return;//已記錄過就不再記錄了
       }
       if(document.all.item('rowsn').value==''){
         document.all.item('rowsn').value=rowsn;
       } else{
         document.all.item('rowsn').value=document.all.item('rowsn').value + ',' + rowsn;
       }
    }

    function fc_save_before_check(){
         // 群組編號
         if (document.all.item('group_no').value==""){
            alert("群組編號沒有值!!");
            return;
         }

         document.all.item('prgAction').value='save';
         document.forms[0].submit();
    }
     // 取得表格名稱(依系統編號)
    function fc_get_wkf_prg_data_1(obj1,sys_no){
           varURL="";
           if(sys_no==undefined){
             varURL="/SWD/pages/pub/find_wkf_prg.jsp";
           }
           else{
             varURL="/SWD/pages/pub/find_wkf_prg.jsp?sys_no=" + sys_no;
           }
           ret=window.showModalDialog(varURL,"_blank","status:no");
           if(ret==null){return null;}
           val=ret.split(',,,,,');
           obj1.value=val[0];
           document.all("prg_cname").value=val[1];
           return val[0];
      }
      //fc_get_sys_data

</script>
<body bgcolor="#ffffff" onload="<%=view.getOnloadScript()%>">
<TABLE BORDER="0" HEIGHT="20" CELLPADDING="0" CELLSPACING="0">
	<TR>
		<TD BACKGROUND="/SWD/pub_images/title_bg.gif">
		<DIV ALIGN="LEFT"><IMG SRC="/SWD/pub_images/title01.gif"
			WIDTH="18" HEIGHT="24" HSPACE="0" alt="" /><IMG
			SRC="/SWD/pub_images/glass.gif" WIDTH="12" HEIGHT="8" alt="" /></DIV>
		</TD>
		<TD ALIGN="LEFT" HEIGHT="20" VALIGN="MIDDLE"
			BACKGROUND="/SWD/pub_images/title_bg.gif" CLASS="TITLE">此程式包含在那些系統中</TD>
		<TD BACKGROUND="/SWD/pub_images/title_bg.gif">
		<DIV ALIGN="RIGHT"><IMG SRC="/SWD/pub_images/glass.gif"
			WIDTH="12" HEIGHT="8" alt="" /><IMG SRC="/SWD/pub_images/title02.gif"
			WIDTH="18" HEIGHT="24" HSPACE="0" alt="" /></DIV>
		</TD>
	</TR>
</TABLE>
<br />
<form action="<%=request.getRequestURI() %>" method="POST">
<TABLE BORDER="0" WIDTH="540px" CELLSPACING="1" CELLPADDING="0">
	<TR>
		<TD nowrap WIDTH="20%" CLASS="td_head">程式編號</TD>
		<TD WIDTH="80%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="prg_no" SIZE="20" MAXLENGTH="40"
			VALUE="<%=(view.getprg_no()!=null ? view.getprg_no() : "")%>"
			class="input_window hand"
			onDblClick="javascript:fc_get_wkf_prg_data_1(this)"
			CLASS="input_window hand" "   /></TD>
	</TR>
	<TR>
		<TD nowrap WIDTH="20%" CLASS="td_head">程式中文名稱</TD>
		<TD WIDTH="80%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="prg_cname" SIZE="20" MAXLENGTH="40"
			VALUE="<%=(view.getprg_cname()!=null ? view.getprg_cname() : "")%>"
			class="input" /> <INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnQueryTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:document.all.item('prgAction').value='query';document.forms[0].submit();" />
		<INPUT TYPE="BUTTON" VALUE="<%=view.getBtnCancelTitle()%>"
			CLASS="button b_normal"
			onClick="document.location.href='prg_in_sys_maintain.jsp'" /></TD>
	</TR>
</table>
<BR>

<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="0" style="">
	<TR>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnAddTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:document.all.item('prgAction').value='add';document.forms[0].submit();" /></TD>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnSaveTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:document.all.item('prgAction').value='save';document.forms[0].submit();" /></TD>

		<TD width="90%" CLASS="td_content">&nbsp;</TD>
	</TR>
</TABLE>
<TABLE BORDER="0" WIDTH="100px" CELLSPACING="1" CELLPADDING="0" style="">
	<TR>
		<TD nowrap WIDTH="20%" CLASS="td_head">系統編號</TD>

		<TD CLASS="td_content"><INPUT TYPE="TEXT" NAME="ins_sys_no"
			SIZE="10" MAXLENGTH="10"
			VALUE="<%=(view.getins_sys_no()!=null ? view.getins_sys_no() : "")%>"
			<%=view.getins_sys_no_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.getins_sys_no_readonly() ? "input_noborder" : "input_window hand")%>"
			onDblClick="javascript:fc_get_sys_data2(this,ins_sys_name)" /></TD>
		<TD nowrap WIDTH="20%" CLASS="td_head">系統名稱</TD>
		<TD CLASS="td_content"><INPUT TYPE="TEXT" NAME="ins_sys_name"
			SIZE="15" MAXLENGTH="15"
			VALUE="<%=(view.getins_sys_name()!=null ? view.getins_sys_name() : "")%>"
			<%=view.getins_sys_name_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.getins_sys_name_readonly() ? "input_noborder" : "input")%>" />
		<%

%>
		</TD>
	</TR>
</TABLE>

<INPUT TYPE="HIDDEN" NAME="prgAction" VALUE="<%=view.getPrgAction()%>" />
<INPUT TYPE="HIDDEN" NAME="prgStatus" VALUE="<%=view.getPrgStatus()%>" />
<INPUT TYPE="HIDDEN" NAME="flowAction" VALUE="<%=view.getFlowAction()%>" />
<INPUT TYPE="HIDDEN" NAME="flowStatus" VALUE="<%=view.getFlowStatus()%>" />
<TABLE BORDER="0" WIDTH="540px" CELLSPACING="1" CELLPADDING="0" style="">
	<tr>
		<td>
		<%
   DataView.OutputDataView(DataViewForm, pageContext);
 %>
		</td>
	</tr>
</TABLE>
</form>
</body>
</html>
